<?php
/**
 * Created by PhpStorm.
 * User: 94004
 * Date: 2017/12/31
 * Time: 16:14
 */
header("Access-Control-Allow-Origin:http://jjd.com");
require_once "../php/util/db_helper.php";
$sql = " SELECT * FROM options o WHERE o.`key`='nav_menus' ";
$res = query($sql);
$value = $res[0]["value"];
$data = json_decode($value);
$keys = array_keys($data);
$dataPage = end($keys) + 1;
$arr = array("code" => 101, "msg" => "操作失败");
if ($res) {
    $arr["code"] = 100;
    $arr["msg"] = "操作成功";
    $arr["data"] = $data;
    $arr["dataCount"] = $dataPage;
}
echo json_encode($arr, JSON_UNESCAPED_UNICODE);
?>